package com.gml.design.abstractFactory.simple;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Test {

    private static Logger logger = LoggerFactory.getLogger(Test.class);

    /**
     * 由业务类控制去用哪个redis的集群模式，一旦修改十分复杂
     * @param args
     */
    public static void main(String[] args) {
        CacheService cacheService = new CacheClusterServiceImpl();

        cacheService.set("user_name_01", "小傅哥", 1);
        String val01 = cacheService.get("user_name_01", 1);
        logger.info("缓存集群升级，测试结果：{}", val01);
    }
}
